home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / CLRDVC.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  658 b   |  28 lines

  1.  
  2.                                             /* File       : clrdvc.c ( cleardevice ) */
  3.                                             /* Entered by : A. Wayner */
  4. # include <graphics.h>
  5.  
  6. main()
  7. {
  8.     int graphdriver = DETECT, graphmode;
  9.  
  10.                                             /* Detect adapter type and initialize */
  11.                                             /* graphics system */
  12.     initgraph( &graphdriver, &graphmode, "\\turboc" );
  13.  
  14.     bar( 100, 100, 150, 150 );        /*Draw some object on the screen */
  15.     outtextxy( 10, 10, "Press any key to clear screen ");
  16.     getch();
  17.     cleardevice();
  18.     outtextxy( 10, 10, "Screen cleared...");
  19.  
  20.                                             /* Wait until user presses a key */
  21.     outtextxy( 10, getmaxy() - 50, "Press any key to exit");
  22.  
  23.     getch();
  24.     closegraph();
  25. }
  26.  
  27.  
  28.